How to change color of notification and in-box messages.
do you mean the number of unread notifications and unread inbox messages ? In Facebook they are white with red background.
if yes, goto includes/libs/common.inc.php
functions msg_unread and note_unread
change in both functions the line
[code] return '<span> ('.$num.')</span>'; [/code]
ya i want this.. but a little problem. This modification only changes the color of number eg:-
Inbox[b] 3[/b]
can it done like this
[b]Inbox 3[/b]
a few changes in page.tpl.php
[code] echo ' <td align="right">'.url('u/'.$client['uname'],$client['uname']).' | '.$friendslink.' | '.msg_unread().' | '.note_unread().' | <span class="sub">'.url('member/logout',t('Logout') ).'</span> </td>'; [/code]
in common.inc.php
[code] function msg_unread() { global $client, $ubase; if ($client['id']) { $res = sql_query("select count(*) as num from ".tb()."messages where to_id='{$client['id']}' and from_id>0 and !hasread"); $row = sql_fetch_array($res); $num = $row['num']; if ($num) { return '<span><a style="color:red" href="'.$ubase.'message">'.t('Inbox').' ('.$num.')</a></span>'; } else { return '<span>'.url('message',t('Inbox')).'</span>'; } } else { return '<span>'.url('message',t('Inbox')).'</span>'; } }
".tb()."messages
function note_unread() { global $client, $ubase; if ($client['id']) { $res = sql_query("select count(*) as num from ".tb()."messages where to_id='{$client['id']}' and from_id=0 and !hasread"); $row = sql_fetch_array($res); $num = $row['num']; if ($num) { return '<span><a style="color:red" href="'.$ubase.'notifications">'.t('Notifications').' ('.$num.')</a></span>'; } else { return '<span>'.url('notifications',t('Notifications')).'</span>'; } } else { return '<span>'.url('notifications',t('Notifications')).'</span>'; } } [/code]
Thanks works great..!!
and how to change for friends request ? number only
function frd_request
[code] return url('friends/requests',t('Friends').'<span> ('.$row['num'].')</span>'); [/code]
thank you abhimanyusharma003